/*
 * Copyright (c) 2019. ascend 版权所有禁止转载。
 */

package cn.edu.zua.demo07.enumeration;

/**
 * 说明：
 *
 * @author ascend
 * 2019/1/24 9:23
 */
public enum MailContentTypeEnum {
    /**
     * HTML
     */
    HTML("text/html;charset=UTF-8"),
    /**
     * TEXT
     */
    TEXT("TEXT");

    private String value;

    MailContentTypeEnum(String value) {
        this.value = value;
    }

    // static method

    public MailContentTypeEnum getContentType(String value) {
        for (MailContentTypeEnum typeEnum : MailContentTypeEnum.values()) {
            if (typeEnum.value.equals(value)) {
                return typeEnum;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
